package com.hdax.dm.mapstructs;

import com.hdax.dm.dtos.user.LinkUserDto;
import com.hdax.dm.entity.user.DmLinkUser;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

import java.util.List;

@Mapper(componentModel = "spring")
public abstract class LinkUserDtoMapper {

    @Mappings({
            @Mapping(target = "linkId",source = "id")
    })
    public abstract LinkUserDto toTarget(DmLinkUser source);
    public abstract List<LinkUserDto> toTargetList(List<DmLinkUser> sources);
}
